chrome.cookies.onChanged.addListener( (function(changeInfo)
{
	if(changeInfo.removed)
		return;
	var cookie = changeInfo.cookie;
	var a_year = 365 * 24 * 60 * 60;
	var now = (new Date()).getTime()/1000;
	console.log(cookie.name);
	if(cookie.name == "56f61_winduser" && 
		cookie.expirationDate - now < a_year)
		chrome.cookies.set({
			url: (cookie.secure ? "https" : "http") + "://" + 
				cookie.domain + cookie.path, 
			name: cookie.name, 
			value: cookie.value, 
			domain: cookie.hostOnly ? undefined : cookie.domain, 
			path: cookie.path, 
			secure: cookie.secure, 
			httpOnly: cookie.httpOnly, 
			expirationDate: now + a_year * 10
		});
}) );

